<template>
  <el-select v-bind="$attrs" v-on="$listeners" placeholder="请选择">
    <el-option
      v-for="item in list"
      :key="item.id"
      :value="item.id"
      :label="item.name"
    />
  </el-select>
</template>

<script>
import { selectListApi } from '../../../api/directory'
export default {
  name: 'SelectDirectory',
  data() {
    return {
      list: [],

    }
  },
  created() {
    this.initData()
  },
  methods: {
    async initData() {
      const res = await selectListApi()
      console.log(res);
      this.list = res

    }
  }

}
</script>

<style scoped>
</style>